<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>semrate.review.models</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="semrate.review-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

      <th class="navbar" width="100%"></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;semrate ::
        <a href="semrate.review-module.html">Package&nbsp;review</a> ::
        Module&nbsp;models
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="semrate.review.models-pysrc.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<h1 class="epydoc">Source Code for <a href="semrate.review.models-module.html">Module semrate.review.models</a></h1>
<pre class="py-src">
<a name="L1"></a><tt class="py-lineno">  1</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt class="py-name">django</tt><tt class="py-op">.</tt><tt class="py-name">db</tt> <tt class="py-keyword">import</tt> <tt id="link-0" class="py-name" targets="Module semrate.review.models=semrate.review.models-module.html"><a title="semrate.review.models" class="py-name" href="#" onclick="return doclink('link-0', 'models', 'link-0');">models</a></tt> </tt>
<a name="L2"></a><tt class="py-lineno">  2</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt class="py-name">django</tt> <tt class="py-keyword">import</tt> <tt class="py-name">forms</tt> </tt>
<a name="L3"></a><tt class="py-lineno">  3</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">urllib</tt> </tt>
<a name="L4"></a><tt class="py-lineno">  4</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt class="py-name">django</tt><tt class="py-op">.</tt><tt class="py-name">template</tt><tt class="py-op">.</tt><tt class="py-name">defaultfilters</tt> <tt class="py-keyword">import</tt> <tt class="py-name">slugify</tt> </tt>
<a name="L5"></a><tt class="py-lineno">  5</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt class="py-name">member</tt><tt class="py-op">.</tt><tt id="link-1" class="py-name"><a title="semrate.review.models" class="py-name" href="#" onclick="return doclink('link-1', 'models', 'link-0');">models</a></tt> <tt class="py-keyword">import</tt> <tt class="py-name">UserProfile</tt> </tt>
<a name="L6"></a><tt class="py-lineno">  6</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt class="py-name">django</tt><tt class="py-op">.</tt><tt class="py-name">db</tt><tt class="py-op">.</tt><tt id="link-2" class="py-name"><a title="semrate.review.models" class="py-name" href="#" onclick="return doclink('link-2', 'models', 'link-0');">models</a></tt> <tt class="py-keyword">import</tt> <tt class="py-name">Count</tt> </tt>
<a name="Category"></a><div id="Category-def"><a name="L7"></a><tt class="py-lineno">  7</tt>  <tt class="py-line"> </tt>
<a name="L8"></a><tt class="py-lineno">  8</tt> <a class="py-toggle" href="#" id="Category-toggle" onclick="return toggle('Category');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="semrate.review.models.Category-class.html">Category</a><tt class="py-op">(</tt><tt class="py-base-class">models</tt><tt class="py-op">.</tt><tt class="py-base-class">Model</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Category-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="Category-expanded"><a name="L9"></a><tt class="py-lineno">  9</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L10"></a><tt class="py-lineno"> 10</tt>  <tt class="py-line"><tt class="py-docstring">        Category class for the products. Each product might belong to one category.</tt> </tt>
<a name="L11"></a><tt class="py-lineno"> 11</tt>  <tt class="py-line"><tt class="py-docstring">        Categories can be Mobile Phones, Automobiles, etc.</tt> </tt>
<a name="L12"></a><tt class="py-lineno"> 12</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L13"></a><tt class="py-lineno"> 13</tt>  <tt class="py-line">        <tt id="link-3" class="py-name" targets="Variable semrate.review.models.Category.name=semrate.review.models.Category-class.html#name,Variable semrate.review.models.CategoryParameter.name=semrate.review.models.CategoryParameter-class.html#name,Variable semrate.review.models.Parameter.name=semrate.review.models.Parameter-class.html#name,Variable semrate.review.models.Product.name=semrate.review.models.Product-class.html#name"><a title="semrate.review.models.Category.name
semrate.review.models.CategoryParameter.name
semrate.review.models.Parameter.name
semrate.review.models.Product.name" class="py-name" href="#" onclick="return doclink('link-3', 'name', 'link-3');">name</a></tt> <tt class="py-op">=</tt> <tt id="link-4" class="py-name"><a title="semrate.review.models" class="py-name" href="#" onclick="return doclink('link-4', 'models', 'link-0');">models</a></tt><tt class="py-op">.</tt><tt class="py-name">CharField</tt><tt class="py-op">(</tt><tt class="py-name">max_length</tt><tt class="py-op">=</tt><tt class="py-number">20</tt><tt class="py-op">,</tt> <tt class="py-name">unique</tt><tt class="py-op">=</tt><tt class="py-name">True</tt><tt class="py-op">)</tt> </tt>
<a name="L14"></a><tt class="py-lineno"> 14</tt>  <tt class="py-line">        <tt id="link-5" class="py-name" targets="Variable semrate.review.models.Category.slug=semrate.review.models.Category-class.html#slug,Variable semrate.review.models.CategoryParameter.slug=semrate.review.models.CategoryParameter-class.html#slug,Variable semrate.review.models.Parameter.slug=semrate.review.models.Parameter-class.html#slug,Variable semrate.review.models.Product.slug=semrate.review.models.Product-class.html#slug"><a title="semrate.review.models.Category.slug
semrate.review.models.CategoryParameter.slug
semrate.review.models.Parameter.slug
semrate.review.models.Product.slug" class="py-name" href="#" onclick="return doclink('link-5', 'slug', 'link-5');">slug</a></tt> <tt class="py-op">=</tt> <tt id="link-6" class="py-name"><a title="semrate.review.models" class="py-name" href="#" onclick="return doclink('link-6', 'models', 'link-0');">models</a></tt><tt class="py-op">.</tt><tt class="py-name">SlugField</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L15"></a><tt class="py-lineno"> 15</tt>  <tt class="py-line">        <tt id="link-7" class="py-name" targets="Variable semrate.review.models.Category.creator=semrate.review.models.Category-class.html#creator,Variable semrate.review.models.Product.creator=semrate.review.models.Product-class.html#creator"><a title="semrate.review.models.Category.creator
semrate.review.models.Product.creator" class="py-name" href="#" onclick="return doclink('link-7', 'creator', 'link-7');">creator</a></tt> <tt class="py-op">=</tt> <tt id="link-8" class="py-name"><a title="semrate.review.models" class="py-name" href="#" onclick="return doclink('link-8', 'models', 'link-0');">models</a></tt><tt class="py-op">.</tt><tt class="py-name">ForeignKey</tt><tt class="py-op">(</tt><tt class="py-name">UserProfile</tt><tt class="py-op">,</tt> <tt class="py-name">related_name</tt><tt class="py-op">=</tt><tt class="py-string">'category_creator'</tt><tt class="py-op">)</tt> </tt>
<a name="L16"></a><tt class="py-lineno"> 16</tt>  <tt class="py-line">        <tt id="link-9" class="py-name" targets="Variable semrate.review.models.Category.last_activity=semrate.review.models.Category-class.html#last_activity,Variable semrate.review.models.Product.last_activity=semrate.review.models.Product-class.html#last_activity"><a title="semrate.review.models.Category.last_activity
semrate.review.models.Product.last_activity" class="py-name" href="#" onclick="return doclink('link-9', 'last_activity', 'link-9');">last_activity</a></tt> <tt class="py-op">=</tt> <tt id="link-10" class="py-name"><a title="semrate.review.models" class="py-name" href="#" onclick="return doclink('link-10', 'models', 'link-0');">models</a></tt><tt class="py-op">.</tt><tt class="py-name">ForeignKey</tt><tt class="py-op">(</tt><tt class="py-name">UserProfile</tt><tt class="py-op">,</tt> <tt class="py-name">related_name</tt><tt class="py-op">=</tt><tt class="py-string">'category_last_editor'</tt><tt class="py-op">)</tt> </tt>
<a name="L17"></a><tt class="py-lineno"> 17</tt>  <tt class="py-line">        <tt id="link-11" class="py-name" targets="Variable semrate.review.models.Category.last_activity_time=semrate.review.models.Category-class.html#last_activity_time,Variable semrate.review.models.Product.last_activity_time=semrate.review.models.Product-class.html#last_activity_time"><a title="semrate.review.models.Category.last_activity_time
semrate.review.models.Product.last_activity_time" class="py-name" href="#" onclick="return doclink('link-11', 'last_activity_time', 'link-11');">last_activity_time</a></tt> <tt class="py-op">=</tt> <tt id="link-12" class="py-name"><a title="semrate.review.models" class="py-name" href="#" onclick="return doclink('link-12', 'models', 'link-0');">models</a></tt><tt class="py-op">.</tt><tt class="py-name">DateTimeField</tt><tt class="py-op">(</tt><tt class="py-name">auto_now_add</tt><tt class="py-op">=</tt><tt class="py-name">True</tt><tt class="py-op">)</tt> </tt>
<a name="L18"></a><tt class="py-lineno"> 18</tt>  <tt class="py-line">        <tt id="link-13" class="py-name" targets="Variable semrate.review.models.Category.created_time=semrate.review.models.Category-class.html#created_time,Variable semrate.review.models.Product.created_time=semrate.review.models.Product-class.html#created_time"><a title="semrate.review.models.Category.created_time
semrate.review.models.Product.created_time" class="py-name" href="#" onclick="return doclink('link-13', 'created_time', 'link-13');">created_time</a></tt> <tt class="py-op">=</tt> <tt id="link-14" class="py-name"><a title="semrate.review.models" class="py-name" href="#" onclick="return doclink('link-14', 'models', 'link-0');">models</a></tt><tt class="py-op">.</tt><tt class="py-name">DateTimeField</tt><tt class="py-op">(</tt><tt class="py-name">auto_now_add</tt><tt class="py-op">=</tt><tt class="py-name">True</tt><tt class="py-op">)</tt> </tt>
<a name="L19"></a><tt class="py-lineno"> 19</tt>  <tt class="py-line"> </tt>
<a name="Category.get_params"></a><div id="Category.get_params-def"><a name="L20"></a><tt class="py-lineno"> 20</tt> <a class="py-toggle" href="#" id="Category.get_params-toggle" onclick="return toggle('Category.get_params');">-</a><tt class="py-line">        <tt class="py-keyword">def</tt> <a class="py-def-name" href="semrate.review.models.Category-class.html#get_params">get_params</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Category.get_params-collapsed" style="display:none;" pad="+++" indent="++++++++++++"></div><div id="Category.get_params-expanded"><a name="L21"></a><tt class="py-lineno"> 21</tt>  <tt class="py-line">          <tt class="py-keyword">return</tt> <tt id="link-15" class="py-name" targets="Class semrate.review.models.CategoryParameter=semrate.review.models.CategoryParameter-class.html"><a title="semrate.review.models.CategoryParameter" class="py-name" href="#" onclick="return doclink('link-15', 'CategoryParameter', 'link-15');">CategoryParameter</a></tt><tt class="py-op">.</tt><tt id="link-16" class="py-name" targets="Method semrate.review.models.Category.objects()=semrate.review.models.Category-class.html#objects,Method semrate.review.models.CategoryParameter.objects()=semrate.review.models.CategoryParameter-class.html#objects,Method semrate.review.models.Parameter.objects()=semrate.review.models.Parameter-class.html#objects,Method semrate.review.models.Product.objects()=semrate.review.models.Product-class.html#objects,Method semrate.review.models.Score.objects()=semrate.review.models.Score-class.html#objects,Method semrate.review.models.Tag.objects()=semrate.review.models.Tag-class.html#objects"><a title="semrate.review.models.Category.objects
semrate.review.models.CategoryParameter.objects
semrate.review.models.Parameter.objects
semrate.review.models.Product.objects
semrate.review.models.Score.objects
semrate.review.models.Tag.objects" class="py-name" href="#" onclick="return doclink('link-16', 'objects', 'link-16');">objects</a></tt><tt class="py-op">.</tt><tt class="py-name">filter</tt><tt class="py-op">(</tt><tt id="link-17" class="py-name" targets="Variable semrate.review.models.CategoryParameter.category=semrate.review.models.CategoryParameter-class.html#category,Variable semrate.review.models.Product.category=semrate.review.models.Product-class.html#category,Function semrate.review.views.category()=semrate.review.views-module.html#category"><a title="semrate.review.models.CategoryParameter.category
semrate.review.models.Product.category
semrate.review.views.category" class="py-name" href="#" onclick="return doclink('link-17', 'category', 'link-17');">category</a></tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">)</tt> </tt>
</div><a name="Category.__str__"></a><div id="Category.__str__-def"><a name="L22"></a><tt class="py-lineno"> 22</tt> <a class="py-toggle" href="#" id="Category.__str__-toggle" onclick="return toggle('Category.__str__');">-</a><tt class="py-line">        <tt class="py-keyword">def</tt> <a class="py-def-name" href="semrate.review.models.Category-class.html#__str__">__str__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Category.__str__-collapsed" style="display:none;" pad="+++" indent="++++++++++++"></div><div id="Category.__str__-expanded"><a name="L23"></a><tt class="py-lineno"> 23</tt>  <tt class="py-line">                <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-18" class="py-name"><a title="semrate.review.models.Category.name
semrate.review.models.CategoryParameter.name
semrate.review.models.Parameter.name
semrate.review.models.Product.name" class="py-name" href="#" onclick="return doclink('link-18', 'name', 'link-3');">name</a></tt> </tt>
</div></div><a name="L24"></a><tt class="py-lineno"> 24</tt>  <tt class="py-line">         </tt>
<a name="CategoryParameter"></a><div id="CategoryParameter-def"><a name="L25"></a><tt class="py-lineno"> 25</tt>  <tt class="py-line"> </tt>
<a name="L26"></a><tt class="py-lineno"> 26</tt> <a class="py-toggle" href="#" id="CategoryParameter-toggle" onclick="return toggle('CategoryParameter');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="semrate.review.models.CategoryParameter-class.html">CategoryParameter</a><tt class="py-op">(</tt><tt class="py-base-class">models</tt><tt class="py-op">.</tt><tt class="py-base-class">Model</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="CategoryParameter-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="CategoryParameter-expanded"><a name="L27"></a><tt class="py-lineno"> 27</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L28"></a><tt class="py-lineno"> 28</tt>  <tt class="py-line"><tt class="py-docstring">        This is the abstract category parameter like Screen that belongs to all items from that category.</tt> </tt>
<a name="L29"></a><tt class="py-lineno"> 29</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="L30"></a><tt class="py-lineno"> 30</tt>  <tt class="py-line">        <tt id="link-19" class="py-name"><a title="semrate.review.models.Category.name
semrate.review.models.CategoryParameter.name
semrate.review.models.Parameter.name
semrate.review.models.Product.name" class="py-name" href="#" onclick="return doclink('link-19', 'name', 'link-3');">name</a></tt> <tt class="py-op">=</tt> <tt id="link-20" class="py-name"><a title="semrate.review.models" class="py-name" href="#" onclick="return doclink('link-20', 'models', 'link-0');">models</a></tt><tt class="py-op">.</tt><tt class="py-name">CharField</tt><tt class="py-op">(</tt><tt class="py-name">max_length</tt><tt class="py-op">=</tt><tt class="py-number">30</tt><tt class="py-op">)</tt> </tt>
<a name="L31"></a><tt class="py-lineno"> 31</tt>  <tt class="py-line">        <tt id="link-21" class="py-name"><a title="semrate.review.models.Category.slug
semrate.review.models.CategoryParameter.slug
semrate.review.models.Parameter.slug
semrate.review.models.Product.slug" class="py-name" href="#" onclick="return doclink('link-21', 'slug', 'link-5');">slug</a></tt> <tt class="py-op">=</tt> <tt id="link-22" class="py-name"><a title="semrate.review.models" class="py-name" href="#" onclick="return doclink('link-22', 'models', 'link-0');">models</a></tt><tt class="py-op">.</tt><tt class="py-name">SlugField</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L32"></a><tt class="py-lineno"> 32</tt>  <tt class="py-line">        <tt id="link-23" class="py-name"><a title="semrate.review.models.CategoryParameter.category
semrate.review.models.Product.category
semrate.review.views.category" class="py-name" href="#" onclick="return doclink('link-23', 'category', 'link-17');">category</a></tt> <tt class="py-op">=</tt> <tt id="link-24" class="py-name"><a title="semrate.review.models" class="py-name" href="#" onclick="return doclink('link-24', 'models', 'link-0');">models</a></tt><tt class="py-op">.</tt><tt class="py-name">ForeignKey</tt><tt class="py-op">(</tt><tt id="link-25" class="py-name" targets="Class semrate.review.models.Category=semrate.review.models.Category-class.html"><a title="semrate.review.models.Category" class="py-name" href="#" onclick="return doclink('link-25', 'Category', 'link-25');">Category</a></tt><tt class="py-op">)</tt> </tt>
<a name="L33"></a><tt class="py-lineno"> 33</tt>  <tt class="py-line">         </tt>
<a name="CategoryParameter.__str__"></a><div id="CategoryParameter.__str__-def"><a name="L34"></a><tt class="py-lineno"> 34</tt> <a class="py-toggle" href="#" id="CategoryParameter.__str__-toggle" onclick="return toggle('CategoryParameter.__str__');">-</a><tt class="py-line">        <tt class="py-keyword">def</tt> <a class="py-def-name" href="semrate.review.models.CategoryParameter-class.html#__str__">__str__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="CategoryParameter.__str__-collapsed" style="display:none;" pad="+++" indent="++++++++++++"></div><div id="CategoryParameter.__str__-expanded"><a name="L35"></a><tt class="py-lineno"> 35</tt>  <tt class="py-line">                <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-26" class="py-name"><a title="semrate.review.models.Category.name
semrate.review.models.CategoryParameter.name
semrate.review.models.Parameter.name
semrate.review.models.Product.name" class="py-name" href="#" onclick="return doclink('link-26', 'name', 'link-3');">name</a></tt> </tt>
</div></div><a name="L36"></a><tt class="py-lineno"> 36</tt>  <tt class="py-line">         </tt>
<a name="Product"></a><div id="Product-def"><a name="L37"></a><tt class="py-lineno"> 37</tt> <a class="py-toggle" href="#" id="Product-toggle" onclick="return toggle('Product');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="semrate.review.models.Product-class.html">Product</a><tt class="py-op">(</tt><tt class="py-base-class">models</tt><tt class="py-op">.</tt><tt class="py-base-class">Model</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Product-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="Product-expanded"><a name="L38"></a><tt class="py-lineno"> 38</tt>  <tt class="py-line">  <tt class="py-docstring">"""</tt> </tt>
<a name="L39"></a><tt class="py-lineno"> 39</tt>  <tt class="py-line"><tt class="py-docstring">  This is the class for Product or Services that is going to be rated.</tt> </tt>
<a name="L40"></a><tt class="py-lineno"> 40</tt>  <tt class="py-line"><tt class="py-docstring">  """</tt> </tt>
<a name="L41"></a><tt class="py-lineno"> 41</tt>  <tt class="py-line">  <tt id="link-27" class="py-name"><a title="semrate.review.models.Category.slug
semrate.review.models.CategoryParameter.slug
semrate.review.models.Parameter.slug
semrate.review.models.Product.slug" class="py-name" href="#" onclick="return doclink('link-27', 'slug', 'link-5');">slug</a></tt> <tt class="py-op">=</tt> <tt id="link-28" class="py-name"><a title="semrate.review.models" class="py-name" href="#" onclick="return doclink('link-28', 'models', 'link-0');">models</a></tt><tt class="py-op">.</tt><tt class="py-name">CharField</tt><tt class="py-op">(</tt><tt class="py-name">max_length</tt><tt class="py-op">=</tt><tt class="py-number">32</tt><tt class="py-op">,</tt> <tt class="py-name">unique</tt><tt class="py-op">=</tt><tt class="py-name">True</tt><tt class="py-op">)</tt> </tt>
<a name="L42"></a><tt class="py-lineno"> 42</tt>  <tt class="py-line">  <tt id="link-29" class="py-name"><a title="semrate.review.models.Category.name
semrate.review.models.CategoryParameter.name
semrate.review.models.Parameter.name
semrate.review.models.Product.name" class="py-name" href="#" onclick="return doclink('link-29', 'name', 'link-3');">name</a></tt> <tt class="py-op">=</tt> <tt id="link-30" class="py-name"><a title="semrate.review.models" class="py-name" href="#" onclick="return doclink('link-30', 'models', 'link-0');">models</a></tt><tt class="py-op">.</tt><tt class="py-name">CharField</tt><tt class="py-op">(</tt><tt class="py-name">max_length</tt><tt class="py-op">=</tt><tt class="py-number">32</tt><tt class="py-op">,</tt> <tt class="py-name">unique</tt><tt class="py-op">=</tt><tt class="py-name">True</tt><tt class="py-op">)</tt> </tt>
<a name="L43"></a><tt class="py-lineno"> 43</tt>  <tt class="py-line">  <tt id="link-31" class="py-name" targets="Variable semrate.review.models.Product.description=semrate.review.models.Product-class.html#description"><a title="semrate.review.models.Product.description" class="py-name" href="#" onclick="return doclink('link-31', 'description', 'link-31');">description</a></tt> <tt class="py-op">=</tt> <tt id="link-32" class="py-name"><a title="semrate.review.models" class="py-name" href="#" onclick="return doclink('link-32', 'models', 'link-0');">models</a></tt><tt class="py-op">.</tt><tt class="py-name">TextField</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L44"></a><tt class="py-lineno"> 44</tt>  <tt class="py-line">  <tt id="link-33" class="py-name"><a title="semrate.review.models.CategoryParameter.category
semrate.review.models.Product.category
semrate.review.views.category" class="py-name" href="#" onclick="return doclink('link-33', 'category', 'link-17');">category</a></tt> <tt class="py-op">=</tt> <tt id="link-34" class="py-name"><a title="semrate.review.models" class="py-name" href="#" onclick="return doclink('link-34', 'models', 'link-0');">models</a></tt><tt class="py-op">.</tt><tt class="py-name">ForeignKey</tt><tt class="py-op">(</tt><tt id="link-35" class="py-name"><a title="semrate.review.models.Category" class="py-name" href="#" onclick="return doclink('link-35', 'Category', 'link-25');">Category</a></tt><tt class="py-op">)</tt> </tt>
<a name="L45"></a><tt class="py-lineno"> 45</tt>  <tt class="py-line">  <tt id="link-36" class="py-name" targets="Variable semrate.review.models.Product.imgslug=semrate.review.models.Product-class.html#imgslug"><a title="semrate.review.models.Product.imgslug" class="py-name" href="#" onclick="return doclink('link-36', 'imgslug', 'link-36');">imgslug</a></tt> <tt class="py-op">=</tt> <tt id="link-37" class="py-name"><a title="semrate.review.models" class="py-name" href="#" onclick="return doclink('link-37', 'models', 'link-0');">models</a></tt><tt class="py-op">.</tt><tt class="py-name">CharField</tt><tt class="py-op">(</tt><tt class="py-name">max_length</tt><tt class="py-op">=</tt><tt class="py-string">'256'</tt><tt class="py-op">,</tt><tt class="py-name">null</tt><tt class="py-op">=</tt><tt class="py-name">True</tt><tt class="py-op">,</tt><tt class="py-name">blank</tt><tt class="py-op">=</tt><tt class="py-name">True</tt><tt class="py-op">)</tt> </tt>
<a name="L46"></a><tt class="py-lineno"> 46</tt>  <tt class="py-line">  <tt id="link-38" class="py-name"><a title="semrate.review.models.Category.creator
semrate.review.models.Product.creator" class="py-name" href="#" onclick="return doclink('link-38', 'creator', 'link-7');">creator</a></tt> <tt class="py-op">=</tt> <tt id="link-39" class="py-name"><a title="semrate.review.models" class="py-name" href="#" onclick="return doclink('link-39', 'models', 'link-0');">models</a></tt><tt class="py-op">.</tt><tt class="py-name">ForeignKey</tt><tt class="py-op">(</tt><tt class="py-name">UserProfile</tt><tt class="py-op">,</tt> <tt class="py-name">related_name</tt><tt class="py-op">=</tt><tt class="py-string">'product_creator'</tt><tt class="py-op">)</tt> </tt>
<a name="L47"></a><tt class="py-lineno"> 47</tt>  <tt class="py-line">  <tt id="link-40" class="py-name"><a title="semrate.review.models.Category.last_activity
semrate.review.models.Product.last_activity" class="py-name" href="#" onclick="return doclink('link-40', 'last_activity', 'link-9');">last_activity</a></tt> <tt class="py-op">=</tt> <tt id="link-41" class="py-name"><a title="semrate.review.models" class="py-name" href="#" onclick="return doclink('link-41', 'models', 'link-0');">models</a></tt><tt class="py-op">.</tt><tt class="py-name">ForeignKey</tt><tt class="py-op">(</tt><tt class="py-name">UserProfile</tt><tt class="py-op">,</tt> <tt class="py-name">related_name</tt><tt class="py-op">=</tt><tt class="py-string">'product_last_editor'</tt><tt class="py-op">)</tt> </tt>
<a name="L48"></a><tt class="py-lineno"> 48</tt>  <tt class="py-line">  <tt id="link-42" class="py-name"><a title="semrate.review.models.Category.last_activity_time
semrate.review.models.Product.last_activity_time" class="py-name" href="#" onclick="return doclink('link-42', 'last_activity_time', 'link-11');">last_activity_time</a></tt> <tt class="py-op">=</tt> <tt id="link-43" class="py-name"><a title="semrate.review.models" class="py-name" href="#" onclick="return doclink('link-43', 'models', 'link-0');">models</a></tt><tt class="py-op">.</tt><tt class="py-name">DateTimeField</tt><tt class="py-op">(</tt><tt class="py-name">auto_now_add</tt><tt class="py-op">=</tt><tt class="py-name">True</tt><tt class="py-op">)</tt> </tt>
<a name="L49"></a><tt class="py-lineno"> 49</tt>  <tt class="py-line">  <tt id="link-44" class="py-name"><a title="semrate.review.models.Category.created_time
semrate.review.models.Product.created_time" class="py-name" href="#" onclick="return doclink('link-44', 'created_time', 'link-13');">created_time</a></tt> <tt class="py-op">=</tt> <tt id="link-45" class="py-name"><a title="semrate.review.models" class="py-name" href="#" onclick="return doclink('link-45', 'models', 'link-0');">models</a></tt><tt class="py-op">.</tt><tt class="py-name">DateTimeField</tt><tt class="py-op">(</tt><tt class="py-name">auto_now_add</tt><tt class="py-op">=</tt><tt class="py-name">True</tt><tt class="py-op">)</tt> </tt>
<a name="L50"></a><tt class="py-lineno"> 50</tt>  <tt class="py-line">   </tt>
<a name="Product.clean_fields"></a><div id="Product.clean_fields-def"><a name="L51"></a><tt class="py-lineno"> 51</tt> <a class="py-toggle" href="#" id="Product.clean_fields-toggle" onclick="return toggle('Product.clean_fields');">-</a><tt class="py-line">  <tt class="py-keyword">def</tt> <a class="py-def-name" href="semrate.review.models.Product-class.html#clean_fields">clean_fields</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">exclude</tt><tt class="py-op">=</tt><tt class="py-op">[</tt><tt class="py-op">]</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Product.clean_fields-collapsed" style="display:none;" pad="+++" indent="++++++"></div><div id="Product.clean_fields-expanded"><a name="L52"></a><tt class="py-lineno"> 52</tt>  <tt class="py-line">    <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-46" class="py-name"><a title="semrate.review.models.Category.name
semrate.review.models.CategoryParameter.name
semrate.review.models.Parameter.name
semrate.review.models.Product.name" class="py-name" href="#" onclick="return doclink('link-46', 'name', 'link-3');">name</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-47" class="py-name"><a title="semrate.review.models.Category.name
semrate.review.models.CategoryParameter.name
semrate.review.models.Parameter.name
semrate.review.models.Product.name" class="py-name" href="#" onclick="return doclink('link-47', 'name', 'link-3');">name</a></tt><tt class="py-op">.</tt><tt class="py-name">strip</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L53"></a><tt class="py-lineno"> 53</tt>  <tt class="py-line">    <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-48" class="py-name"><a title="semrate.review.models.Category.slug
semrate.review.models.CategoryParameter.slug
semrate.review.models.Parameter.slug
semrate.review.models.Product.slug" class="py-name" href="#" onclick="return doclink('link-48', 'slug', 'link-5');">slug</a></tt> <tt class="py-op">=</tt> <tt class="py-name">urllib</tt><tt class="py-op">.</tt><tt class="py-name">quote</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-49" class="py-name"><a title="semrate.review.models.Category.name
semrate.review.models.CategoryParameter.name
semrate.review.models.Parameter.name
semrate.review.models.Product.name" class="py-name" href="#" onclick="return doclink('link-49', 'name', 'link-3');">name</a></tt><tt class="py-op">.</tt><tt class="py-name">replace</tt><tt class="py-op">(</tt><tt class="py-string">' '</tt><tt class="py-op">,</tt><tt class="py-string">'_'</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">lower</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
</div><a name="Product.__str__"></a><div id="Product.__str__-def"><a name="L54"></a><tt class="py-lineno"> 54</tt> <a class="py-toggle" href="#" id="Product.__str__-toggle" onclick="return toggle('Product.__str__');">-</a><tt class="py-line">  <tt class="py-keyword">def</tt> <a class="py-def-name" href="semrate.review.models.Product-class.html#__str__">__str__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Product.__str__-collapsed" style="display:none;" pad="+++" indent="++++++"></div><div id="Product.__str__-expanded"><a name="L55"></a><tt class="py-lineno"> 55</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-50" class="py-name"><a title="semrate.review.models.Category.name
semrate.review.models.CategoryParameter.name
semrate.review.models.Parameter.name
semrate.review.models.Product.name" class="py-name" href="#" onclick="return doclink('link-50', 'name', 'link-3');">name</a></tt> </tt>
</div></div><a name="L56"></a><tt class="py-lineno"> 56</tt>  <tt class="py-line"> </tt>
<a name="Parameter"></a><div id="Parameter-def"><a name="L57"></a><tt class="py-lineno"> 57</tt> <a class="py-toggle" href="#" id="Parameter-toggle" onclick="return toggle('Parameter');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="semrate.review.models.Parameter-class.html">Parameter</a><tt class="py-op">(</tt><tt class="py-base-class">models</tt><tt class="py-op">.</tt><tt class="py-base-class">Model</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Parameter-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="Parameter-expanded"><a name="L58"></a><tt class="py-lineno"> 58</tt>  <tt class="py-line">  <tt class="py-docstring">"""</tt> </tt>
<a name="L59"></a><tt class="py-lineno"> 59</tt>  <tt class="py-line"><tt class="py-docstring">  This is the class for the parameter for a product. Like Screen or Battery.</tt> </tt>
<a name="L60"></a><tt class="py-lineno"> 60</tt>  <tt class="py-line"><tt class="py-docstring">  """</tt> </tt>
<a name="L61"></a><tt class="py-lineno"> 61</tt>  <tt class="py-line">  <tt id="link-51" class="py-name"><a title="semrate.review.models.Category.name
semrate.review.models.CategoryParameter.name
semrate.review.models.Parameter.name
semrate.review.models.Product.name" class="py-name" href="#" onclick="return doclink('link-51', 'name', 'link-3');">name</a></tt> <tt class="py-op">=</tt> <tt id="link-52" class="py-name"><a title="semrate.review.models" class="py-name" href="#" onclick="return doclink('link-52', 'models', 'link-0');">models</a></tt><tt class="py-op">.</tt><tt class="py-name">CharField</tt><tt class="py-op">(</tt><tt class="py-name">max_length</tt><tt class="py-op">=</tt><tt class="py-number">32</tt><tt class="py-op">)</tt> </tt>
<a name="L62"></a><tt class="py-lineno"> 62</tt>  <tt class="py-line">  <tt id="link-53" class="py-name"><a title="semrate.review.models.Category.slug
semrate.review.models.CategoryParameter.slug
semrate.review.models.Parameter.slug
semrate.review.models.Product.slug" class="py-name" href="#" onclick="return doclink('link-53', 'slug', 'link-5');">slug</a></tt> <tt class="py-op">=</tt> <tt id="link-54" class="py-name"><a title="semrate.review.models" class="py-name" href="#" onclick="return doclink('link-54', 'models', 'link-0');">models</a></tt><tt class="py-op">.</tt><tt class="py-name">CharField</tt><tt class="py-op">(</tt><tt class="py-name">max_length</tt><tt class="py-op">=</tt><tt class="py-number">32</tt><tt class="py-op">)</tt>  <tt class="py-comment"># short name</tt> </tt>
<a name="L63"></a><tt class="py-lineno"> 63</tt>  <tt class="py-line">  <tt id="link-55" class="py-name" targets="Variable semrate.review.models.Parameter.product=semrate.review.models.Parameter-class.html#product"><a title="semrate.review.models.Parameter.product" class="py-name" href="#" onclick="return doclink('link-55', 'product', 'link-55');">product</a></tt> <tt class="py-op">=</tt> <tt id="link-56" class="py-name"><a title="semrate.review.models" class="py-name" href="#" onclick="return doclink('link-56', 'models', 'link-0');">models</a></tt><tt class="py-op">.</tt><tt class="py-name">ForeignKey</tt><tt class="py-op">(</tt><tt id="link-57" class="py-name" targets="Class semrate.review.models.Product=semrate.review.models.Product-class.html"><a title="semrate.review.models.Product" class="py-name" href="#" onclick="return doclink('link-57', 'Product', 'link-57');">Product</a></tt><tt class="py-op">)</tt>    <tt class="py-comment"># foreign key to product.</tt> </tt>
<a name="L64"></a><tt class="py-lineno"> 64</tt>  <tt class="py-line">  <tt id="link-58" class="py-name" targets="Variable semrate.review.models.Parameter.score_total=semrate.review.models.Parameter-class.html#score_total"><a title="semrate.review.models.Parameter.score_total" class="py-name" href="#" onclick="return doclink('link-58', 'score_total', 'link-58');">score_total</a></tt> <tt class="py-op">=</tt> <tt id="link-59" class="py-name"><a title="semrate.review.models" class="py-name" href="#" onclick="return doclink('link-59', 'models', 'link-0');">models</a></tt><tt class="py-op">.</tt><tt class="py-name">IntegerField</tt><tt class="py-op">(</tt><tt class="py-name">default</tt><tt class="py-op">=</tt><tt class="py-number">0</tt><tt class="py-op">)</tt>          <tt class="py-comment"># total scores given by users.</tt> </tt>
<a name="L65"></a><tt class="py-lineno"> 65</tt>  <tt class="py-line">  <tt id="link-60" class="py-name" targets="Variable semrate.review.models.Parameter.score_count=semrate.review.models.Parameter-class.html#score_count"><a title="semrate.review.models.Parameter.score_count" class="py-name" href="#" onclick="return doclink('link-60', 'score_count', 'link-60');">score_count</a></tt> <tt class="py-op">=</tt> <tt id="link-61" class="py-name"><a title="semrate.review.models" class="py-name" href="#" onclick="return doclink('link-61', 'models', 'link-0');">models</a></tt><tt class="py-op">.</tt><tt class="py-name">IntegerField</tt><tt class="py-op">(</tt><tt class="py-name">default</tt><tt class="py-op">=</tt><tt class="py-number">0</tt><tt class="py-op">)</tt>          <tt class="py-comment"># total number of votes</tt> </tt>
<a name="L66"></a><tt class="py-lineno"> 66</tt>  <tt class="py-line">   </tt>
<a name="Parameter.slug_wo"></a><div id="Parameter.slug_wo-def"><a name="L67"></a><tt class="py-lineno"> 67</tt> <a class="py-toggle" href="#" id="Parameter.slug_wo-toggle" onclick="return toggle('Parameter.slug_wo');">-</a><tt class="py-line">  <tt class="py-keyword">def</tt> <a class="py-def-name" href="semrate.review.models.Parameter-class.html#slug_wo">slug_wo</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Parameter.slug_wo-collapsed" style="display:none;" pad="+++" indent="++++++"></div><div id="Parameter.slug_wo-expanded"><a name="L68"></a><tt class="py-lineno"> 68</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-62" class="py-name"><a title="semrate.review.models.Category.slug
semrate.review.models.CategoryParameter.slug
semrate.review.models.Parameter.slug
semrate.review.models.Product.slug" class="py-name" href="#" onclick="return doclink('link-62', 'slug', 'link-5');">slug</a></tt><tt class="py-op">[</tt><tt class="py-number">1</tt><tt class="py-op">:</tt><tt class="py-op">]</tt> </tt>
</div><a name="L69"></a><tt class="py-lineno"> 69</tt>  <tt class="py-line">   </tt>
<a name="L70"></a><tt class="py-lineno"> 70</tt>  <tt class="py-line">   </tt>
<a name="Parameter.__str__"></a><div id="Parameter.__str__-def"><a name="L71"></a><tt class="py-lineno"> 71</tt> <a class="py-toggle" href="#" id="Parameter.__str__-toggle" onclick="return toggle('Parameter.__str__');">-</a><tt class="py-line">  <tt class="py-keyword">def</tt> <a class="py-def-name" href="semrate.review.models.Parameter-class.html#__str__">__str__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Parameter.__str__-collapsed" style="display:none;" pad="+++" indent="++++++"></div><div id="Parameter.__str__-expanded"><a name="L72"></a><tt class="py-lineno"> 72</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L73"></a><tt class="py-lineno"> 73</tt>  <tt class="py-line"><tt class="py-docstring">    String representaton of the parameter.</tt> </tt>
<a name="L74"></a><tt class="py-lineno"> 74</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L75"></a><tt class="py-lineno"> 75</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt class="py-string">'%s - %s'</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-63" class="py-name"><a title="semrate.review.models.Parameter.product" class="py-name" href="#" onclick="return doclink('link-63', 'product', 'link-55');">product</a></tt><tt class="py-op">.</tt><tt id="link-64" class="py-name"><a title="semrate.review.models.Category.name
semrate.review.models.CategoryParameter.name
semrate.review.models.Parameter.name
semrate.review.models.Product.name" class="py-name" href="#" onclick="return doclink('link-64', 'name', 'link-3');">name</a></tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">category_parameter</tt><tt class="py-op">.</tt><tt id="link-65" class="py-name"><a title="semrate.review.models.Category.name
semrate.review.models.CategoryParameter.name
semrate.review.models.Parameter.name
semrate.review.models.Product.name" class="py-name" href="#" onclick="return doclink('link-65', 'name', 'link-3');">name</a></tt><tt class="py-op">)</tt> </tt>
</div><a name="L76"></a><tt class="py-lineno"> 76</tt>  <tt class="py-line">     </tt>
<a name="Parameter.get_tags"></a><div id="Parameter.get_tags-def"><a name="L77"></a><tt class="py-lineno"> 77</tt> <a class="py-toggle" href="#" id="Parameter.get_tags-toggle" onclick="return toggle('Parameter.get_tags');">-</a><tt class="py-line">  <tt class="py-keyword">def</tt> <a class="py-def-name" href="semrate.review.models.Parameter-class.html#get_tags">get_tags</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Parameter.get_tags-collapsed" style="display:none;" pad="+++" indent="++++++"></div><div id="Parameter.get_tags-expanded"><a name="L78"></a><tt class="py-lineno"> 78</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L79"></a><tt class="py-lineno"> 79</tt>  <tt class="py-line"><tt class="py-docstring">    Returns the tags tagged for this parameter</tt> </tt>
<a name="L80"></a><tt class="py-lineno"> 80</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L81"></a><tt class="py-lineno"> 81</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt id="link-66" class="py-name" targets="Class semrate.review.models.Tag=semrate.review.models.Tag-class.html"><a title="semrate.review.models.Tag" class="py-name" href="#" onclick="return doclink('link-66', 'Tag', 'link-66');">Tag</a></tt><tt class="py-op">.</tt><tt id="link-67" class="py-name"><a title="semrate.review.models.Category.objects
semrate.review.models.CategoryParameter.objects
semrate.review.models.Parameter.objects
semrate.review.models.Product.objects
semrate.review.models.Score.objects
semrate.review.models.Tag.objects" class="py-name" href="#" onclick="return doclink('link-67', 'objects', 'link-16');">objects</a></tt><tt class="py-op">.</tt><tt class="py-name">filter</tt><tt class="py-op">(</tt><tt id="link-68" class="py-name" targets="Variable semrate.review.models.Tag.parameter=semrate.review.models.Tag-class.html#parameter"><a title="semrate.review.models.Tag.parameter" class="py-name" href="#" onclick="return doclink('link-68', 'parameter', 'link-68');">parameter</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">)</tt> </tt>
</div><a name="L82"></a><tt class="py-lineno"> 82</tt>  <tt class="py-line">     </tt>
<a name="Parameter.get_tags_neg"></a><div id="Parameter.get_tags_neg-def"><a name="L83"></a><tt class="py-lineno"> 83</tt> <a class="py-toggle" href="#" id="Parameter.get_tags_neg-toggle" onclick="return toggle('Parameter.get_tags_neg');">-</a><tt class="py-line">  <tt class="py-keyword">def</tt> <a class="py-def-name" href="semrate.review.models.Parameter-class.html#get_tags_neg">get_tags_neg</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Parameter.get_tags_neg-collapsed" style="display:none;" pad="+++" indent="++++++"></div><div id="Parameter.get_tags_neg-expanded"><a name="L84"></a><tt class="py-lineno"> 84</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L85"></a><tt class="py-lineno"> 85</tt>  <tt class="py-line"><tt class="py-docstring">    Returns the negative tags tagged for this parameter</tt> </tt>
<a name="L86"></a><tt class="py-lineno"> 86</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L87"></a><tt class="py-lineno"> 87</tt>  <tt class="py-line"> </tt>
<a name="L88"></a><tt class="py-lineno"> 88</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt id="link-69" class="py-name"><a title="semrate.review.models.Tag" class="py-name" href="#" onclick="return doclink('link-69', 'Tag', 'link-66');">Tag</a></tt><tt class="py-op">.</tt><tt id="link-70" class="py-name"><a title="semrate.review.models.Category.objects
semrate.review.models.CategoryParameter.objects
semrate.review.models.Parameter.objects
semrate.review.models.Product.objects
semrate.review.models.Score.objects
semrate.review.models.Tag.objects" class="py-name" href="#" onclick="return doclink('link-70', 'objects', 'link-16');">objects</a></tt><tt class="py-op">.</tt><tt class="py-name">filter</tt><tt class="py-op">(</tt><tt id="link-71" class="py-name"><a title="semrate.review.models.Tag.parameter" class="py-name" href="#" onclick="return doclink('link-71', 'parameter', 'link-68');">parameter</a></tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">,</tt> <tt id="link-72" class="py-name" targets="Variable semrate.review.models.Tag.charge=semrate.review.models.Tag-class.html#charge"><a title="semrate.review.models.Tag.charge" class="py-name" href="#" onclick="return doclink('link-72', 'charge', 'link-72');">charge</a></tt><tt class="py-op">=</tt><tt class="py-op">-</tt><tt class="py-number">1</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">values</tt><tt class="py-op">(</tt><tt class="py-string">'tagtext'</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">order_by</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">annotate</tt><tt class="py-op">(</tt><tt class="py-name">Count</tt><tt class="py-op">(</tt><tt class="py-string">'tagtext'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
</div><a name="L89"></a><tt class="py-lineno"> 89</tt>  <tt class="py-line">     </tt>
<a name="Parameter.get_tags_pos"></a><div id="Parameter.get_tags_pos-def"><a name="L90"></a><tt class="py-lineno"> 90</tt> <a class="py-toggle" href="#" id="Parameter.get_tags_pos-toggle" onclick="return toggle('Parameter.get_tags_pos');">-</a><tt class="py-line">  <tt class="py-keyword">def</tt> <a class="py-def-name" href="semrate.review.models.Parameter-class.html#get_tags_pos">get_tags_pos</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Parameter.get_tags_pos-collapsed" style="display:none;" pad="+++" indent="++++++"></div><div id="Parameter.get_tags_pos-expanded"><a name="L91"></a><tt class="py-lineno"> 91</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L92"></a><tt class="py-lineno"> 92</tt>  <tt class="py-line"><tt class="py-docstring">    Returns the positive tags tagged for this parameter</tt> </tt>
<a name="L93"></a><tt class="py-lineno"> 93</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L94"></a><tt class="py-lineno"> 94</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt id="link-73" class="py-name"><a title="semrate.review.models.Tag" class="py-name" href="#" onclick="return doclink('link-73', 'Tag', 'link-66');">Tag</a></tt><tt class="py-op">.</tt><tt id="link-74" class="py-name"><a title="semrate.review.models.Category.objects
semrate.review.models.CategoryParameter.objects
semrate.review.models.Parameter.objects
semrate.review.models.Product.objects
semrate.review.models.Score.objects
semrate.review.models.Tag.objects" class="py-name" href="#" onclick="return doclink('link-74', 'objects', 'link-16');">objects</a></tt><tt class="py-op">.</tt><tt class="py-name">filter</tt><tt class="py-op">(</tt><tt id="link-75" class="py-name"><a title="semrate.review.models.Tag.parameter" class="py-name" href="#" onclick="return doclink('link-75', 'parameter', 'link-68');">parameter</a></tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">,</tt> <tt id="link-76" class="py-name"><a title="semrate.review.models.Tag.charge" class="py-name" href="#" onclick="return doclink('link-76', 'charge', 'link-72');">charge</a></tt><tt class="py-op">=</tt><tt class="py-number">1</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">values</tt><tt class="py-op">(</tt><tt class="py-string">'tagtext'</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">order_by</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">annotate</tt><tt class="py-op">(</tt><tt class="py-name">Count</tt><tt class="py-op">(</tt><tt class="py-string">'tagtext'</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
</div><a name="L95"></a><tt class="py-lineno"> 95</tt>  <tt class="py-line">     </tt>
<a name="Parameter.get_score"></a><div id="Parameter.get_score-def"><a name="L96"></a><tt class="py-lineno"> 96</tt> <a class="py-toggle" href="#" id="Parameter.get_score-toggle" onclick="return toggle('Parameter.get_score');">-</a><tt class="py-line">  <tt class="py-keyword">def</tt> <a class="py-def-name" href="semrate.review.models.Parameter-class.html#get_score">get_score</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Parameter.get_score-collapsed" style="display:none;" pad="+++" indent="++++++"></div><div id="Parameter.get_score-expanded"><a name="L97"></a><tt class="py-lineno"> 97</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L98"></a><tt class="py-lineno"> 98</tt>  <tt class="py-line"><tt class="py-docstring">    Returns the average score by a simple calculation.</tt> </tt>
<a name="L99"></a><tt class="py-lineno"> 99</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L100"></a><tt class="py-lineno">100</tt>  <tt class="py-line">    <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-77" class="py-name"><a title="semrate.review.models.Parameter.score_count" class="py-name" href="#" onclick="return doclink('link-77', 'score_count', 'link-60');">score_count</a></tt><tt class="py-op">:</tt> </tt>
<a name="L101"></a><tt class="py-lineno">101</tt>  <tt class="py-line">      <tt class="py-keyword">return</tt> <tt class="py-string">'-'</tt> </tt>
<a name="L102"></a><tt class="py-lineno">102</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt class="py-string">"%.2f"</tt> <tt class="py-op">%</tt> <tt class="py-op">(</tt><tt class="py-name">float</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-78" class="py-name"><a title="semrate.review.models.Parameter.score_total" class="py-name" href="#" onclick="return doclink('link-78', 'score_total', 'link-58');">score_total</a></tt><tt class="py-op">)</tt> <tt class="py-op">/</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-79" class="py-name"><a title="semrate.review.models.Parameter.score_count" class="py-name" href="#" onclick="return doclink('link-79', 'score_count', 'link-60');">score_count</a></tt><tt class="py-op">)</tt> </tt>
</div><a name="L103"></a><tt class="py-lineno">103</tt>  <tt class="py-line">   </tt>
<a name="L104"></a><tt class="py-lineno">104</tt>  <tt class="py-line">  <tt class="py-decorator">@</tt><tt class="py-decorator">property</tt> </tt>
<a name="Parameter.score"></a><div id="Parameter.score-def"><a name="L105"></a><tt class="py-lineno">105</tt> <a class="py-toggle" href="#" id="Parameter.score-toggle" onclick="return toggle('Parameter.score');">-</a><tt class="py-line">  <tt class="py-keyword">def</tt> <a class="py-def-name" href="semrate.review.models.Parameter-class.html#score">score</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Parameter.score-collapsed" style="display:none;" pad="+++" indent="++++++"></div><div id="Parameter.score-expanded"><a name="L106"></a><tt class="py-lineno">106</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<a name="L107"></a><tt class="py-lineno">107</tt>  <tt class="py-line"><tt class="py-docstring">    This is just for allowing template to use calculated average score.</tt> </tt>
<a name="L108"></a><tt class="py-lineno">108</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<a name="L109"></a><tt class="py-lineno">109</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-80" class="py-name" targets="Method semrate.review.models.Parameter.get_score()=semrate.review.models.Parameter-class.html#get_score"><a title="semrate.review.models.Parameter.get_score" class="py-name" href="#" onclick="return doclink('link-80', 'get_score', 'link-80');">get_score</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt>   </tt>
</div><a name="L110"></a><tt class="py-lineno">110</tt>  <tt class="py-line"> </tt>
<a name="Parameter.clean_fields"></a><div id="Parameter.clean_fields-def"><a name="L111"></a><tt class="py-lineno">111</tt> <a class="py-toggle" href="#" id="Parameter.clean_fields-toggle" onclick="return toggle('Parameter.clean_fields');">-</a><tt class="py-line">  <tt class="py-keyword">def</tt> <a class="py-def-name" href="semrate.review.models.Parameter-class.html#clean_fields">clean_fields</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">exclude</tt><tt class="py-op">=</tt><tt class="py-op">[</tt><tt class="py-op">]</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Parameter.clean_fields-collapsed" style="display:none;" pad="+++" indent="++++++"></div><div id="Parameter.clean_fields-expanded"><a name="L112"></a><tt class="py-lineno">112</tt>  <tt class="py-line">    <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">category_parameter</tt><tt class="py-op">.</tt><tt id="link-81" class="py-name"><a title="semrate.review.models.Category.name
semrate.review.models.CategoryParameter.name
semrate.review.models.Parameter.name
semrate.review.models.Product.name" class="py-name" href="#" onclick="return doclink('link-81', 'name', 'link-3');">name</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">category_parameter</tt><tt class="py-op">.</tt><tt id="link-82" class="py-name"><a title="semrate.review.models.Category.name
semrate.review.models.CategoryParameter.name
semrate.review.models.Parameter.name
semrate.review.models.Product.name" class="py-name" href="#" onclick="return doclink('link-82', 'name', 'link-3');">name</a></tt><tt class="py-op">.</tt><tt class="py-name">strip</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L113"></a><tt class="py-lineno">113</tt>  <tt class="py-line">    <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-83" class="py-name"><a title="semrate.review.models.Category.slug
semrate.review.models.CategoryParameter.slug
semrate.review.models.Parameter.slug
semrate.review.models.Product.slug" class="py-name" href="#" onclick="return doclink('link-83', 'slug', 'link-5');">slug</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">category_parameter</tt><tt class="py-op">.</tt><tt id="link-84" class="py-name"><a title="semrate.review.models.Category.name
semrate.review.models.CategoryParameter.name
semrate.review.models.Parameter.name
semrate.review.models.Product.name" class="py-name" href="#" onclick="return doclink('link-84', 'name', 'link-3');">name</a></tt><tt class="py-op">.</tt><tt class="py-name">replace</tt><tt class="py-op">(</tt><tt class="py-string">' '</tt><tt class="py-op">,</tt><tt class="py-string">'_'</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt class="py-name">lower</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
</div></div><a name="L114"></a><tt class="py-lineno">114</tt>  <tt class="py-line"> </tt>
<a name="Tag"></a><div id="Tag-def"><a name="L115"></a><tt class="py-lineno">115</tt> <a class="py-toggle" href="#" id="Tag-toggle" onclick="return toggle('Tag');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="semrate.review.models.Tag-class.html">Tag</a><tt class="py-op">(</tt><tt class="py-base-class">models</tt><tt class="py-op">.</tt><tt class="py-base-class">Model</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Tag-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="Tag-expanded"><a name="L116"></a><tt class="py-lineno">116</tt>  <tt class="py-line">  <tt class="py-docstring">"""</tt> </tt>
<a name="L117"></a><tt class="py-lineno">117</tt>  <tt class="py-line"><tt class="py-docstring">  This is the tag assignment that is done to the parameters of products. </tt> </tt>
<a name="L118"></a><tt class="py-lineno">118</tt>  <tt class="py-line"><tt class="py-docstring">  Each tag has an author(tagger), date, text, charge(+/-) and parameter(tagged object)</tt> </tt>
<a name="L119"></a><tt class="py-lineno">119</tt>  <tt class="py-line"><tt class="py-docstring">  """</tt> </tt>
<a name="L120"></a><tt class="py-lineno">120</tt>  <tt class="py-line">  <tt id="link-85" class="py-name" targets="Variable semrate.review.models.Tag.tagtext=semrate.review.models.Tag-class.html#tagtext,Variable semrate.review.models.TagForm.tagtext=semrate.review.models.TagForm-class.html#tagtext"><a title="semrate.review.models.Tag.tagtext
semrate.review.models.TagForm.tagtext" class="py-name" href="#" onclick="return doclink('link-85', 'tagtext', 'link-85');">tagtext</a></tt> <tt class="py-op">=</tt> <tt id="link-86" class="py-name"><a title="semrate.review.models" class="py-name" href="#" onclick="return doclink('link-86', 'models', 'link-0');">models</a></tt><tt class="py-op">.</tt><tt class="py-name">CharField</tt><tt class="py-op">(</tt><tt class="py-name">max_length</tt><tt class="py-op">=</tt><tt class="py-number">32</tt><tt class="py-op">)</tt> </tt>
<a name="L121"></a><tt class="py-lineno">121</tt>  <tt class="py-line">  <tt id="link-87" class="py-name"><a title="semrate.review.models.Tag.charge" class="py-name" href="#" onclick="return doclink('link-87', 'charge', 'link-72');">charge</a></tt> <tt class="py-op">=</tt> <tt id="link-88" class="py-name"><a title="semrate.review.models" class="py-name" href="#" onclick="return doclink('link-88', 'models', 'link-0');">models</a></tt><tt class="py-op">.</tt><tt class="py-name">IntegerField</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L122"></a><tt class="py-lineno">122</tt>  <tt class="py-line">  <tt id="link-89" class="py-name"><a title="semrate.review.models.Tag.parameter" class="py-name" href="#" onclick="return doclink('link-89', 'parameter', 'link-68');">parameter</a></tt> <tt class="py-op">=</tt> <tt id="link-90" class="py-name"><a title="semrate.review.models" class="py-name" href="#" onclick="return doclink('link-90', 'models', 'link-0');">models</a></tt><tt class="py-op">.</tt><tt class="py-name">ForeignKey</tt><tt class="py-op">(</tt><tt id="link-91" class="py-name" targets="Class semrate.review.models.Parameter=semrate.review.models.Parameter-class.html"><a title="semrate.review.models.Parameter" class="py-name" href="#" onclick="return doclink('link-91', 'Parameter', 'link-91');">Parameter</a></tt><tt class="py-op">)</tt> </tt>
<a name="L123"></a><tt class="py-lineno">123</tt>  <tt class="py-line">  <tt id="link-92" class="py-name" targets="Variable semrate.review.models.Tag.author=semrate.review.models.Tag-class.html#author"><a title="semrate.review.models.Tag.author" class="py-name" href="#" onclick="return doclink('link-92', 'author', 'link-92');">author</a></tt> <tt class="py-op">=</tt> <tt id="link-93" class="py-name"><a title="semrate.review.models" class="py-name" href="#" onclick="return doclink('link-93', 'models', 'link-0');">models</a></tt><tt class="py-op">.</tt><tt class="py-name">ForeignKey</tt><tt class="py-op">(</tt><tt class="py-name">UserProfile</tt><tt class="py-op">)</tt> </tt>
<a name="L124"></a><tt class="py-lineno">124</tt>  <tt class="py-line">  <tt id="link-94" class="py-name" targets="Variable semrate.review.models.Tag.date=semrate.review.models.Tag-class.html#date"><a title="semrate.review.models.Tag.date" class="py-name" href="#" onclick="return doclink('link-94', 'date', 'link-94');">date</a></tt> <tt class="py-op">=</tt> <tt id="link-95" class="py-name"><a title="semrate.review.models" class="py-name" href="#" onclick="return doclink('link-95', 'models', 'link-0');">models</a></tt><tt class="py-op">.</tt><tt class="py-name">DateTimeField</tt><tt class="py-op">(</tt><tt class="py-name">auto_now_add</tt><tt class="py-op">=</tt><tt class="py-name">True</tt><tt class="py-op">)</tt> </tt>
<a name="L125"></a><tt class="py-lineno">125</tt>  <tt class="py-line">   </tt>
<a name="Tag.__str__"></a><div id="Tag.__str__-def"><a name="L126"></a><tt class="py-lineno">126</tt> <a class="py-toggle" href="#" id="Tag.__str__-toggle" onclick="return toggle('Tag.__str__');">-</a><tt class="py-line">  <tt class="py-keyword">def</tt> <a class="py-def-name" href="semrate.review.models.Tag-class.html#__str__">__str__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Tag.__str__-collapsed" style="display:none;" pad="+++" indent="++++++"></div><div id="Tag.__str__-expanded"><a name="L127"></a><tt class="py-lineno">127</tt>  <tt class="py-line">    <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-96" class="py-name"><a title="semrate.review.models.Tag.tagtext
semrate.review.models.TagForm.tagtext" class="py-name" href="#" onclick="return doclink('link-96', 'tagtext', 'link-85');">tagtext</a></tt> </tt>
</div></div><a name="L128"></a><tt class="py-lineno">128</tt>  <tt class="py-line"> </tt>
<a name="ProductForm"></a><div id="ProductForm-def"><a name="L129"></a><tt class="py-lineno">129</tt> <a class="py-toggle" href="#" id="ProductForm-toggle" onclick="return toggle('ProductForm');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="semrate.review.models.ProductForm-class.html">ProductForm</a><tt class="py-op">(</tt><tt class="py-base-class">forms</tt><tt class="py-op">.</tt><tt class="py-base-class">ModelForm</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="ProductForm-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="ProductForm-expanded"><a name="L130"></a><tt class="py-lineno">130</tt>  <tt class="py-line">  <tt class="py-docstring">"""</tt> </tt>
<a name="L131"></a><tt class="py-lineno">131</tt>  <tt class="py-line"><tt class="py-docstring">  This class provides information about what to show in a product creation form.</tt> </tt>
<a name="L132"></a><tt class="py-lineno">132</tt>  <tt class="py-line"><tt class="py-docstring">  """</tt> </tt>
<a name="L133"></a><tt class="py-lineno">133</tt>  <tt class="py-line">   </tt>
<a name="ProductForm.Meta"></a><div id="ProductForm.Meta-def"><a name="L134"></a><tt class="py-lineno">134</tt> <a class="py-toggle" href="#" id="ProductForm.Meta-toggle" onclick="return toggle('ProductForm.Meta');">-</a><tt class="py-line">  <tt class="py-keyword">class</tt> <a class="py-def-name" href="semrate.review.models.ProductForm.Meta-class.html">Meta</a><tt class="py-op">:</tt> </tt>
</div><div id="ProductForm.Meta-collapsed" style="display:none;" pad="+++" indent="++++++"></div><div id="ProductForm.Meta-expanded"><a name="L135"></a><tt class="py-lineno">135</tt>  <tt class="py-line">    <tt class="py-name">model</tt> <tt class="py-op">=</tt> <tt id="link-97" class="py-name"><a title="semrate.review.models.Product" class="py-name" href="#" onclick="return doclink('link-97', 'Product', 'link-57');">Product</a></tt> </tt>
<a name="L136"></a><tt class="py-lineno">136</tt>  <tt class="py-line">    <tt id="link-98" class="py-name" targets="Variable semrate.review.models.CategoryForm.Meta.exclude=semrate.review.models.CategoryForm.Meta-class.html#exclude,Variable semrate.review.models.ProductForm.Meta.exclude=semrate.review.models.ProductForm.Meta-class.html#exclude"><a title="semrate.review.models.CategoryForm.Meta.exclude
semrate.review.models.ProductForm.Meta.exclude" class="py-name" href="#" onclick="return doclink('link-98', 'exclude', 'link-98');">exclude</a></tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-string">'slug'</tt><tt class="py-op">,</tt><tt class="py-op">]</tt> </tt>
</div></div><a name="L137"></a><tt class="py-lineno">137</tt>  <tt class="py-line"> </tt>
<a name="CategoryParameterForm"></a><div id="CategoryParameterForm-def"><a name="L138"></a><tt class="py-lineno">138</tt> <a class="py-toggle" href="#" id="CategoryParameterForm-toggle" onclick="return toggle('CategoryParameterForm');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="semrate.review.models.CategoryParameterForm-class.html">CategoryParameterForm</a><tt class="py-op">(</tt><tt class="py-base-class">forms</tt><tt class="py-op">.</tt><tt class="py-base-class">ModelForm</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="CategoryParameterForm-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="CategoryParameterForm-expanded"><a name="L139"></a><tt class="py-lineno">139</tt>  <tt class="py-line">  <tt class="py-docstring">"""</tt> </tt>
<a name="L140"></a><tt class="py-lineno">140</tt>  <tt class="py-line"><tt class="py-docstring">  This class provides information about what to show in a product parameter creation form.</tt> </tt>
<a name="L141"></a><tt class="py-lineno">141</tt>  <tt class="py-line"><tt class="py-docstring">  """</tt> </tt>
<a name="CategoryParameterForm.Meta"></a><div id="CategoryParameterForm.Meta-def"><a name="L142"></a><tt class="py-lineno">142</tt> <a class="py-toggle" href="#" id="CategoryParameterForm.Meta-toggle" onclick="return toggle('CategoryParameterForm.Meta');">-</a><tt class="py-line">  <tt class="py-keyword">class</tt> <a class="py-def-name" href="semrate.review.models.CategoryParameterForm.Meta-class.html">Meta</a><tt class="py-op">:</tt> </tt>
</div><div id="CategoryParameterForm.Meta-collapsed" style="display:none;" pad="+++" indent="++++++"></div><div id="CategoryParameterForm.Meta-expanded"><a name="L143"></a><tt class="py-lineno">143</tt>  <tt class="py-line">    <tt class="py-name">model</tt> <tt class="py-op">=</tt> <tt id="link-99" class="py-name"><a title="semrate.review.models.CategoryParameter" class="py-name" href="#" onclick="return doclink('link-99', 'CategoryParameter', 'link-15');">CategoryParameter</a></tt>   </tt>
</div></div><a name="L144"></a><tt class="py-lineno">144</tt>  <tt class="py-line">   </tt>
<a name="TagForm"></a><div id="TagForm-def"><a name="L145"></a><tt class="py-lineno">145</tt> <a class="py-toggle" href="#" id="TagForm-toggle" onclick="return toggle('TagForm');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="semrate.review.models.TagForm-class.html">TagForm</a><tt class="py-op">(</tt><tt class="py-base-class">forms</tt><tt class="py-op">.</tt><tt class="py-base-class">ModelForm</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="TagForm-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="TagForm-expanded"><a name="L146"></a><tt class="py-lineno">146</tt>  <tt class="py-line">  <tt class="py-docstring">"""</tt> </tt>
<a name="L147"></a><tt class="py-lineno">147</tt>  <tt class="py-line"><tt class="py-docstring">  This class provides information about what to show in a Tag creation form.</tt> </tt>
<a name="L148"></a><tt class="py-lineno">148</tt>  <tt class="py-line"><tt class="py-docstring">  """</tt> </tt>
<a name="TagForm.Meta"></a><div id="TagForm.Meta-def"><a name="L149"></a><tt class="py-lineno">149</tt> <a class="py-toggle" href="#" id="TagForm.Meta-toggle" onclick="return toggle('TagForm.Meta');">-</a><tt class="py-line">  <tt class="py-keyword">class</tt> <a class="py-def-name" href="semrate.review.models.TagForm.Meta-class.html">Meta</a><tt class="py-op">:</tt> </tt>
</div><div id="TagForm.Meta-collapsed" style="display:none;" pad="+++" indent="++++++"></div><div id="TagForm.Meta-expanded"><a name="L150"></a><tt class="py-lineno">150</tt>  <tt class="py-line">    <tt class="py-name">model</tt> <tt class="py-op">=</tt> <tt id="link-100" class="py-name"><a title="semrate.review.models.Tag" class="py-name" href="#" onclick="return doclink('link-100', 'Tag', 'link-66');">Tag</a></tt> </tt>
</div><a name="L151"></a><tt class="py-lineno">151</tt>  <tt class="py-line">  <tt id="link-101" class="py-name"><a title="semrate.review.models.Tag.tagtext
semrate.review.models.TagForm.tagtext" class="py-name" href="#" onclick="return doclink('link-101', 'tagtext', 'link-85');">tagtext</a></tt> <tt class="py-op">=</tt> <tt class="py-name">forms</tt><tt class="py-op">.</tt><tt class="py-name">CharField</tt><tt class="py-op">(</tt><tt class="py-name">widget</tt><tt class="py-op">=</tt><tt class="py-name">forms</tt><tt class="py-op">.</tt><tt class="py-name">TextInput</tt><tt class="py-op">(</tt><tt class="py-name">attrs</tt><tt class="py-op">=</tt><tt class="py-op">{</tt><tt class="py-string">'class'</tt><tt class="py-op">:</tt><tt class="py-string">'taginput'</tt><tt class="py-op">,</tt> <tt class="py-string">'value'</tt><tt class="py-op">:</tt><tt class="py-string">''</tt><tt class="py-op">}</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
</div><a name="L152"></a><tt class="py-lineno">152</tt>  <tt class="py-line"> </tt>
<a name="CategoryForm"></a><div id="CategoryForm-def"><a name="L153"></a><tt class="py-lineno">153</tt> <a class="py-toggle" href="#" id="CategoryForm-toggle" onclick="return toggle('CategoryForm');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="semrate.review.models.CategoryForm-class.html">CategoryForm</a><tt class="py-op">(</tt><tt class="py-base-class">forms</tt><tt class="py-op">.</tt><tt class="py-base-class">ModelForm</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="CategoryForm-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="CategoryForm-expanded"><a name="L154"></a><tt class="py-lineno">154</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<a name="L155"></a><tt class="py-lineno">155</tt>  <tt class="py-line"><tt class="py-docstring">        This class provides information about what to show in a category creation form.</tt> </tt>
<a name="L156"></a><tt class="py-lineno">156</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<a name="CategoryForm.Meta"></a><div id="CategoryForm.Meta-def"><a name="L157"></a><tt class="py-lineno">157</tt> <a class="py-toggle" href="#" id="CategoryForm.Meta-toggle" onclick="return toggle('CategoryForm.Meta');">-</a><tt class="py-line">        <tt class="py-keyword">class</tt> <a class="py-def-name" href="semrate.review.models.CategoryForm.Meta-class.html">Meta</a><tt class="py-op">:</tt> </tt>
</div><div id="CategoryForm.Meta-collapsed" style="display:none;" pad="+++" indent="++++++++++++"></div><div id="CategoryForm.Meta-expanded"><a name="L158"></a><tt class="py-lineno">158</tt>  <tt class="py-line">                <tt class="py-name">model</tt> <tt class="py-op">=</tt> <tt id="link-102" class="py-name"><a title="semrate.review.models.Category" class="py-name" href="#" onclick="return doclink('link-102', 'Category', 'link-25');">Category</a></tt> </tt>
<a name="L159"></a><tt class="py-lineno">159</tt>  <tt class="py-line">                <tt id="link-103" class="py-name"><a title="semrate.review.models.CategoryForm.Meta.exclude
semrate.review.models.ProductForm.Meta.exclude" class="py-name" href="#" onclick="return doclink('link-103', 'exclude', 'link-98');">exclude</a></tt><tt class="py-op">=</tt><tt class="py-op">[</tt><tt class="py-string">'slug'</tt><tt class="py-op">]</tt> </tt>
</div></div><a name="L160"></a><tt class="py-lineno">160</tt>  <tt class="py-line"> </tt>
<a name="Score"></a><div id="Score-def"><a name="L161"></a><tt class="py-lineno">161</tt>  <tt class="py-line"><tt class="py-comment"># Create your models here.</tt> </tt>
<a name="L162"></a><tt class="py-lineno">162</tt>  <tt class="py-line"> </tt>
<a name="L163"></a><tt class="py-lineno">163</tt> <a class="py-toggle" href="#" id="Score-toggle" onclick="return toggle('Score');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="semrate.review.models.Score-class.html">Score</a><tt class="py-op">(</tt><tt class="py-base-class">models</tt><tt class="py-op">.</tt><tt class="py-base-class">Model</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Score-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="Score-expanded"><a name="L164"></a><tt class="py-lineno">164</tt>  <tt class="py-line">  <tt class="py-docstring">"""</tt> </tt>
<a name="L165"></a><tt class="py-lineno">165</tt>  <tt class="py-line"><tt class="py-docstring">  This class is for handling number of ratings individually.</tt> </tt>
<a name="L166"></a><tt class="py-lineno">166</tt>  <tt class="py-line"><tt class="py-docstring">  """</tt> </tt>
<a name="L167"></a><tt class="py-lineno">167</tt>  <tt class="py-line">  <tt id="link-104" class="py-name" targets="Variable semrate.review.models.Score.user=semrate.review.models.Score-class.html#user,Function semrate.review.views.user()=semrate.review.views-module.html#user"><a title="semrate.review.models.Score.user
semrate.review.views.user" class="py-name" href="#" onclick="return doclink('link-104', 'user', 'link-104');">user</a></tt> <tt class="py-op">=</tt> <tt id="link-105" class="py-name"><a title="semrate.review.models" class="py-name" href="#" onclick="return doclink('link-105', 'models', 'link-0');">models</a></tt><tt class="py-op">.</tt><tt class="py-name">ForeignKey</tt><tt class="py-op">(</tt><tt class="py-name">UserProfile</tt><tt class="py-op">)</tt> </tt>
<a name="L168"></a><tt class="py-lineno">168</tt>  <tt class="py-line">  <tt id="link-106" class="py-name" targets="Variable semrate.review.models.Score.value=semrate.review.models.Score-class.html#value"><a title="semrate.review.models.Score.value" class="py-name" href="#" onclick="return doclink('link-106', 'value', 'link-106');">value</a></tt> <tt class="py-op">=</tt> <tt id="link-107" class="py-name"><a title="semrate.review.models" class="py-name" href="#" onclick="return doclink('link-107', 'models', 'link-0');">models</a></tt><tt class="py-op">.</tt><tt class="py-name">IntegerField</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L169"></a><tt class="py-lineno">169</tt>  <tt class="py-line">  <tt id="link-108" class="py-name" targets="Variable semrate.review.models.Score.param=semrate.review.models.Score-class.html#param"><a title="semrate.review.models.Score.param" class="py-name" href="#" onclick="return doclink('link-108', 'param', 'link-108');">param</a></tt> <tt class="py-op">=</tt> <tt id="link-109" class="py-name"><a title="semrate.review.models" class="py-name" href="#" onclick="return doclink('link-109', 'models', 'link-0');">models</a></tt><tt class="py-op">.</tt><tt class="py-name">ForeignKey</tt><tt class="py-op">(</tt><tt id="link-110" class="py-name"><a title="semrate.review.models.Parameter" class="py-name" href="#" onclick="return doclink('link-110', 'Parameter', 'link-91');">Parameter</a></tt><tt class="py-op">)</tt> </tt>
</div><a name="L170"></a><tt class="py-lineno">170</tt>  <tt class="py-line"> </tt><script type="text/javascript">
<!--
expandto(location.href);
// -->
</script>
</pre>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="semrate.review-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

      <th class="navbar" width="100%"></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0.1 on Sun Jan 15 00:10:41 2012
    </td>
    <td align="right" class="footer">
      <a target="mainFrame" href="http://epydoc.sourceforge.net"
        >http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie();
  // -->
</script>
</body>
</html>
